/**
 * Copyright notice
 */
package com.gtd

/**
 * General Interface Service for all domain class
 * @author  hoatle
 *          hoatlevan at gmail dot com
 * @since   1.0
 * @created Jul 6, 2009
 */
 interface IObjectService {
	 /**
	  * Get object definition
	  */
	  def getDefinition()

	 /**
	  * Get object Present
	  */
	  def getPresent(o)

	 /**
	  * Get object list Present
	  */
	  def getListPresent(oList)

	 /**
	  * Create object by params
	  * @param params
	  * @return validated?
	  */
	  def create(params)

	 /**
	  * Get one object by id
	  */
	  def get(id)

	 /**
	  * Get all objects
	  */
	  def get()

	 /**
	  * Get range of objects
	  */
	  def get(page, itemsPerPage)

	 /**
	  * Save object
	  */
	  def save(o)

	 /**
	  * Delete object
	  */
	  def delete(id)

 }
